package com.leadtone.autoTest.operators;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.leadtone.autoTest.interfaces.ICefOperator;
import com.leadtone.commons.ssh.SshProcess;

public class CefOperator extends BaseOperator implements ICefOperator {

	private static Log logger = LogFactory.getLog(CefOperator.class); 
	
	public CefOperator(String host, String user, String password) {
		super(host, user, password);
	}

	public boolean openCefTunnel() {
		int ret = 1;
		SshProcess process = null; 
		try {
			process = getShell().spawn("service tunnel start");
		} catch (Exception e) {
			e.printStackTrace();
			logger.info("caught a exception during opening the tunnel");
		}
		return ret == 0 ? true:false;
	}

	public boolean isTunnelconnected() {
		// TODO Auto-generated method stub
		return false;
	}

}
